//package com.tao.queueLifier;
//
//import com.rabbitmq.client.Channel;
//import com.tao.common.utils.JsonUtil;
//import com.tao.dataobject.UserInfo;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.core.MessageProperties;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
//@Slf4j
//@Component
//public class UserListener {
//
//
////    @RabbitListener(queues = "userQueue")
//    public void handler(Message message, Channel channel) throws IOException {
//        long deliveryTag = message.getMessageProperties().getDeliveryTag();
//        UserInfo userInfo = JsonUtil.parseObject(new String(message.getBody()), UserInfo.class);
//        log.info("接收到注册成功用户, userInfo: " + userInfo);
//        channel.basicAck(deliveryTag, true);
//    }
//}
